//
//  ImageViewViewController.m
//  ImageView
//

#import "ImageViewViewController.h"

@implementation ImageViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	UIImage *anImage = [UIImage imageNamed:@"myImage.png"];
	UIImageView *myImageView = [[UIImageView alloc] initWithImage:anImage];
	
	[self.view addSubview:myImageView];
	
	CGSize viewSize = myImageView.bounds.size;
	// 가로 폭을 절반으로 줄인다
	viewSize.width = viewSize.width * 0.5;
	// 세로 높이는 그대로 유지한다.
	viewSize.height = viewSize.height;
	
	CGRect newFrame = CGRectMake(0, 0, viewSize.width, viewSize.height);
	[myImageView setFrame:newFrame];
	
	[myImageView release];
}

- (void)dealloc {
    [super dealloc];
}

@end
